Repository navigation
fix(pr): bound pagination allocations before growth - #2694
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 4bace0f | Commit Preview URL Branch Preview URL |
Oct 12 2026, 01:01 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
prrefuses pagination growth before exceeding its 16 MiB cap or shared live-memory budget. Headers append directly; cells and page slices borrow existing storage. Input, row and pagination loops charge work and check cancellation/deadlines, including skipped pages. Resource-limit failures leave the session reusable.Date headers are retained as timestamps and formatted for one nonempty stream at a time, preventing eager duplication across inputs.
Numbered joined columns now expand number separators at local tab stops, preserving GNU
proutput in the finite compatibility corpus.Why
A long header repeated across short pages bypassed body-row accounting. The final output check ran only after building the amplified output, so an untrusted script could exhaust the embedding process.
Before / After
Bash::execregression produced 268,436 bytes despite a 64 KiB live budget.-Dformat peaked at 1,313,620 bytes before; 258,964 bytes after, with the same 128 KiB live budget and empty output.508967f5; upstream fix(security): bound tar lists and nested substitution parsing #2678 fixes it. The rebased branch passes the existing depth-50, hard-cap, recovery and Bash comparison tests without raising stacks or weakening assertions.Risk
Medium: oversized or budget-exhausting
prrequests now return an API resource-limit error during rendering instead of a late builtin exit status. Ordinary pagination remains GNU-compatible in the tested cases.Checklist
Validation: full
just pre-pr, all-features Clippy, feature-sliced tests, security properties, dependency checks, CLI smoke, builtin inventory regeneration and performance suites (Criterion quick-mode smoke; no statistical regression claim). CI must finish green before merge.